<?php
 $localhosts='localhost';
 $usernames='root';
 $passwords='root';
 //连接数据库
 $conn=mysqli_connect($localhosts,$usernames,$passwords);
 $query='use flower';
//创建列flowers
 mysqli_query($conn,$query);

 $username=$_GET['username'];
 $telactive=$_GET['telactive'];
 $password=$_GET['password'];
//  echo $username,$telactive,$password;
 $query="select * from flowers";
 $res=mysqli_query($conn,$query);
 while($row=mysqli_fetch_array($res)){
     echo $row['tel'],"``",$username;
    if($row['tel']===$username){
        mysqli_close($conn);
        die('用户名已存在');
    }
 }
 $query="insert into flowers (tel,password,tel_active) values ('$username','$password','$telactive') ";
 mysqli_query($conn,$query);
 mysqli_close($conn);
 die('注册成功');


?>